home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG: Essential Home & Business / PC-SIG - Essential Home and Business Collection.iso / 08 / 7 / 0 / HGCIB202.ARC / HGCIBM.DOC < prev    next >
Text File  |  1987-06-21  |  46KB  |  1,324 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                              HGCIBM.COM Version 2.02
  13.                Copyright (C) Athena Digital, Gary Batson 1986, 1987
  14.              2351 College Station Road, Suite 567, Athens, Ga. 30605
  15.                                   404/354-4522
  16.  
  17.                           This Manual Dated June 1, 1987
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.                                         1
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                 TABLE OF CONTENTS
  69.  
  70.                                    HGCIBM.COM
  71.  
  72.         Acknowledgements .............................................  3
  73.         Trademarks ...................................................  3
  74.         Using HGCIBM.COM .............................................  3
  75.         Precautions ..................................................  3
  76.         Installation .................................................  4
  77.         Using the Command Line .......................................  5
  78.         HGCTEST program ..............................................  5
  79.         Sales and Distribution Policies ..............................  6
  80.         User Comments ................................................  6
  81.         History ......................................................  6
  82.         Future .......................................................  7
  83.         Changes and Corrections ......................................  7
  84.         Technicalities ...............................................  8
  85.  
  86.                             Athena Digital Video BIOS
  87.  
  88.         Purpose ......................................................  9
  89.         Features .....................................................  9
  90.         Control Program .............................................. 11
  91.         Sales and Distribution Policies .............................. 11
  92.         Software Author Note ......................................... 12
  93.         Extended Functions ........................................... 13
  94.         Library Versions ............................................. 19
  95.         QBDEMOC program .............................................. 19
  96.  
  97.         This program is distributed as Shareware. All rights are reserved 
  98.         except for distribution of the program, its documentation, and 
  99.         any DEMO materials IN ITS ENTIRETY and un-modified. You may test 
  100.         and use this program for 30 days, after which you must register 
  101.         it, destroy it, or pass in along to a friend. If you would like 
  102.         to keep HGCIBM, see the pricing within. This DOES NOT APPLY to 
  103.         those who contributed to HGCIBM Version 1.11. Those individuals 
  104.         are welcome to this upgrade without further remuneration. Please 
  105.         accept it with my THANKS!!
  106.  
  107.         Athena Digital's program and emulation algorithms were first 
  108.         Copyrighted June 10, 1986. It is now the basis for the existence 
  109.         of Athena Digital and represents months of effort and a large 
  110.         personal investment. Any information presented in this document 
  111.         or available in the associated programs is and shall remain the 
  112.         Copyrighted Property of Athena Digital. Any attempt to use this 
  113.         information to create a competitive product, whether the product 
  114.         is distributed "free" or otherwise is in violation of copyright 
  115.         laws.
  116.  
  117.                                  Athena Digital
  118.              2351 College Station Road, Suite 567, Athens, Ga. 30605
  119.  
  120.  
  121.  
  122.  
  123.  
  124.                                         2
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.         DISCLAIMER
  135.  
  136.         Athena Digital makes every effort to ensure that this 
  137.         documentation is accurate. However, because we are constantly 
  138.         striving to improve our products, we are unable to guarantee the 
  139.         accuracy of the contents of this document after the date of 
  140.         publication and we disclaim liability for any changes, errors or 
  141.         omissions. We have also made every effort to warn you of possible 
  142.         damage to your equipment from careless use of other applications 
  143.         with ours. If you do somehow damage your display or anything 
  144.         else, Athena Digital ASSUMES ABSOLUTELY NO RESPONSIBILITY FOR IT. 
  145.         If it will make you more confident, no such claims have ever 
  146.         been made against us .. but we have to protect ourselves.
  147.  
  148.  
  149.         ACKNOWLEDGEMENTS
  150.  
  151.         Athena Digital would like to thank IBM for creating the Personal 
  152.         Computer and Hercules Computer Technology for making PC graphics 
  153.         as pleasurable as PC TTL text.
  154.  
  155.  
  156.         TRADEMARKS MENTIONED
  157.  
  158.         Hercules and RamFont are trademarks of Hercules Computer 
  159.         Technology.
  160.  
  161.         IBM is a trademark of International Business Machines.
  162.  
  163.         Microsoft, QuickBASIC, CodeView and MS-DOS are trademarks of 
  164.         Microsoft Corporation.
  165.  
  166.         Athena Digital Video BIOS is a trademark of Athena Digital.
  167.  
  168.  
  169.         USING HGCIBM.COM
  170.  
  171.         The purpose of this program is to provide owners of Hercules 
  172.         Graphics Cards a means to run software written for the IBM Color 
  173.         Graphics Adapter, and to introduce a commercial version of the 
  174.         BIOS called Athena Digital Video BIOS which offers added 
  175.         functionality.
  176.  
  177.  
  178.         PRECAUTIONS - MONOCHROME DISPLAY DAMAGE !!!
  179.  
  180.         This program will not damage your display, but certain 
  181.         application software certainly can. Programs which attempt to by-
  182.         pass the BIOS (Basic Input/Output System) to set the CRT 
  183.         operating parameters will cause severe problems. Fortunately 
  184.         since most software operates in standard modes, most software 
  185.         developers permit BIOS to set up the controller for them even if 
  186.         they later write to screen ram directly.
  187.                                     (cont'd)
  188.  
  189.  
  190.  
  191.                                         3
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.         HGCIBM will intercept the BIOS calls for all standard modes and 
  202.         program the controller correctly. Writing directly to screen ram 
  203.         is permitted and the emulator will still work properly. When 
  204.         trying an un-tested (with HGCIBM) program for the first time, 
  205.         watch your display carefully for signs of gross distortion or 
  206.         shrinking when the program sets graphics mode. IF THIS OCCURS, 
  207.         RE-BOOT OR TURN OFF YOUR COMPUTER IMMEDIATELY. The display should 
  208.         return to normal quickly when you re-boot.
  209.  
  210.         HGCIBM INSTALLATION
  211.  
  212.         To install the emulator, you must tell it what mode to start in, 
  213.         and a little information about your hardware. There are three 
  214.         "modes" of operation for HGCIBM as follows:
  215.  
  216.         The /E[mulate] mode enables the emulator to respond to BIOS calls 
  217.         to set standard CGA modes and provides maximum compatibility with 
  218.         programs expecting to use the Color Graphics Adapter, but 
  219.         displays the information on your Hercules adapter. When the 
  220.         emulator is in this mode, the text buffer is at segment B800 and 
  221.         the equipment flag is set to indicate that a CGA card is present. 
  222.         Alas, you can't fool all the programs all the time. Some of them 
  223.         read the equipment flag and then try to manipulate the crt 
  224.         controller directly in order to provide faster screen output. 
  225.         Naturally they try to do this at the CGA port addresses (which 
  226.         don't exist) and will hang the system (This problem is overcome 
  227.         with Athena Digital Video BIO). A re-boot will cure the problem 
  228.         and you should then remember to either un-install the emulator 
  229.         before running these programs or simply place it in /M(ono) mode 
  230.         or /C[GA] mode (if you have a physical CGA) as described below.
  231.  
  232.         The /M[ono] mode effectively disables HGCIBM without uninstalling 
  233.         it. The monochrome card is selected and Video BIOS control 
  234.         returns to the computer's ROM (Read Only Memory).
  235.  
  236.         The /C[ga] mode also disables HGCIBM and returns control to ROM 
  237.         except the physical Color Graphics Adapter is selected (if it 
  238.         exists).
  239.  
  240.         There are also 3 installation switches available to warn HGCIBM 
  241.         about special hardware. During initialization, the program tries 
  242.         to determine if a Color Graphics Adapter is present. If it is, 
  243.         the program will not install unless you assure it that the Color 
  244.         Graphics Adapter in your system is compatible with Hercules 
  245.         Graphics cards. If yours is or you have a Leading Edge computer, 
  246.         then you should use the following switches:
  247.  
  248.         The /H[ercules Compatible] switch instructs HGCIBM to install and 
  249.         allow the emulation mode even though a Color Graphics Adapter is 
  250.         present. You may use this switch on installation if you have a 
  251.         Hercules compatible CGA card in your system. If a CGA card is 
  252.         present, HGCIBM will abort installation unless the /H switch is 
  253.         used.
  254.                                     (cont'd)
  255.  
  256.  
  257.  
  258.                                         4
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.         Also note that some software will output to the CGA registers 
  269.         (3D4, 3D5, 3D8, etc.) to adjust video parameters. This can wreak 
  270.         havoc on the real CGA adapter while in Emulation mode. If the CGA 
  271.         is not physically present, this output causes no problems and is 
  272.         ignored by Hercules adapters.
  273.  
  274.         The /L[eading Edge] switch instructs HGCIBM to install if the 
  275.         Leading Edge Model D is connected to a TTL display.
  276.  
  277.         The /U[n-install] switch instructs the emulator to reset all 
  278.         vectors and remove itself from memory, freeing the space for 
  279.         other programs. You may un-install the emulator provided that 
  280.         other programs have not altered vectors 8h and 10h, but memory 
  281.         may become segmented if you have loaded another resident program 
  282.         after HGCIBM. The system will be left in the same condition it 
  283.         was in before the installation. (i.e. monochrome display).
  284.  
  285.         USING THE COMMAND LINE
  286.  
  287.         Simply type the command HGCIBM with a mode switch to install or 
  288.         change to that mode. If you have special hardware, ADD the 
  289.         hardware switch to the mode switch on the same command line as 
  290.         shown in the following examples:
  291.  
  292.         HGCIBM /M      - installs in (or changes to) MONO mode (emulation 
  293.                          disabled)
  294.         HGCIBM /C      - installs in (or changes to) CGA mode (emulation 
  295.                          disabled)
  296.         HGCIBM /E      - installs in (or changes to) Emulation mode.
  297.         HGCIBM /U      - un-installs the emulator
  298.         HGCIBM /M/H    - informs HGCIBM that a Hercules compatible CGA is 
  299.                          physically present.
  300.         HGCIBM /M/L    - informs HGCIBM that you have a Leading Edge 
  301.                          Model D computer.
  302.  
  303.         These commands may be issued from a batch file if desired.
  304.         Hardware switches (/H or /L) are needed only on installation.
  305.  
  306.         To change modes after installation, just enter the command as 
  307.         above. HGCIBM always checks to see if it is already installed and 
  308.         will process the command correctly.
  309.  
  310.         HGCTEST PROGRAM
  311.  
  312.         This program is provided for you to test the operation of HGCIBM 
  313.         with your computer configuration. Before running HGCTEST, Load 
  314.         the emulator with the /E[mulate] switch. HGCTEST.BAS runs under 
  315.         BASICA. Just enter BASICA HGCTEST to run it (assuming BASICA is 
  316.         on the default disk drive with HGCTEST.BAS). The program is a 
  317.         simple graphics demo and is self explanatory. If you have a basic 
  318.         compiler, the demo program can be compiled to test the compiler.
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                         5
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.         SALES AND DISTRIBUTION POLICIES - HGCIBM.COM
  335.  
  336.         There is no limitation on distribution of HGCIBM.COM as long as 
  337.         no remuneration is accepted in connection with it's distribution, 
  338.         and as long as it is distributed un-modified, in it's entirety 
  339.         (including any DEMO materials), and BY ITSELF. IT MUST NOT BE 
  340.         DISTRIBUTED WITH your own application program or hardware, but it 
  341.         is OK to mention that your software/hardware will/wont run with 
  342.         it and our name and telephone number (so he can obtain a copy to 
  343.         run your program). You are permitted a 30 day trial period to 
  344.         decide whether or not you wish to keep HGCIBM or purchase Athena 
  345.         BIOS after which you must either register it with Athena Digital, 
  346.         destroy it, or pass it along to someone else. The registration 
  347.         fee for HGCIBM.COM is $10.00 in check or money order (see 
  348.         REGISTER file in this package).
  349.  
  350.         OEMS and Dealers are encouraged to support Athena BIOS with their 
  351.         products. HGCIBM is an extremely limited version of Athena 
  352.         Digital's software. Those interested should contact Athena 
  353.         Digital for details. 
  354.  
  355.         USER COMMENTS
  356.  
  357.         Let us know what you think. Any criticism is better than none and 
  358.         will help to steer us along a path which is in the majority's 
  359.         best interest. Your suggestions need not be limited to graphics. 
  360.         Any comment regarding Athena Digital programs or documentation is 
  361.         welcome.
  362.  
  363.         Thank you for your support.
  364.  
  365.         HISTORY
  366.  
  367.         In June of 1986, Athena Digital released a simple "Freeware" 
  368.         emulator for Hercules cards which supported only the 200 by 640 
  369.         Color Graphics Card mode (HGCIBM.COM Version 1.11). To our 
  370.         knowledge, this was the first such program publicly released. At 
  371.         first glance there would appear to be no physical way to 
  372.         effectively display CGA graphics on a ttl card. It not only could 
  373.         be done, but done in such a way that resulting display quality is 
  374.         actually better than the real CGA though it is in shades of one 
  375.         color. Support came in from users as far as Israel and eventually 
  376.         from CGA software developers. Though it represented no serious 
  377.         income, This support inspired Athena Digital to create HGCIBM.COM 
  378.         Version 2.00 which offers emulation support of all of the CGA 
  379.         modes and to start the development of Athena's own Video BIOS to 
  380.         support not only emulation, but to provide an upgradeable and 
  381.         expandable Video BIOS which enhances any display system. 
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                         6
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.         FUTURE
  401.  
  402.         Version 2.02 provides only a SUBSET of the Athena Digital support 
  403.         functions. It is a functional emulator only, and does not offer 
  404.         support for Microsoft Mouse, Extended Video BIOS calls, RamFont, 
  405.         or EGA. Due to restrictions imposed by the "resident" utility 
  406.         implementation, the commercial release of Athena's BIOS 
  407.         (ATHENA.SYS Version 3.00) is in the form of an MS-DOS Device 
  408.         Driver. Installed in this way, the program becomes as much a part 
  409.         of the operating system as is the ROM Video BIOS, except that it 
  410.         can be easily upgraded and enhanced. Future enhancements will be 
  411.         limited to Athena BIOS, thus obseleting HGCIBM.COM except as a 
  412.         simple emulator. If bugs are found in HGCIBM, they will be 
  413.         corrected. For more information about the commercial products, 
  414.         read the section called Athena Digital Video BIOS in this 
  415.         document.
  416.  
  417.         HGCIBM CHANGE AND CORRECTION NOTES
  418.  
  419.              o    Version 1.11 would sometimes crash with programs that 
  420.                   intercepted the timer interrupt while in Graphics, and 
  421.                   then changed to text.
  422.  
  423.              o    If interrupts were redirected, Version 1 could not find 
  424.                   itself for a mode change and would install a second 
  425.                   copy. Now it can find and control itself unless it is 
  426.                   bypassed altogether.
  427.  
  428.              o    Version 2.00 (beta test version) would not install on a 
  429.                   Leading Edge due to differences in the way the Leading 
  430.                   Edge video buffers are implemented. This was corrected 
  431.                   with the /L[eading Edge] switch.
  432.  
  433.              o    Version 2.01 failed to detect the EGA and would treat 
  434.                   it as a CGA. Now HGCIBM will abort installation as it 
  435.                   is supposed to.
  436.  
  437.         ENHANCEMENTS
  438.              o    Version 2.02 contains a SUBSET of Athena Digital's own 
  439.                   Video BIOS and will support a wider range of 
  440.                   compatibles as well as the AT. This also provided a 
  441.                   means for improved screen behavior in color text mode, 
  442.                   and faster screen operations if BIOS is used.
  443.  
  444.              o    All standard video modes are now supported. The 320 x 
  445.                   200 mode supports two intensities(colors). Color 1 and 
  446.                   color 2 will appear identical, where color 3 will be 
  447.                   high intensity. Forty column text is supported but will  
  448.                   be displayed on the left half of the screen only at the 
  449.                   same resolution as eighty column text. All four pages 
  450.                   of 80 column text (or 8 pages of 40 column text) are 
  451.                   available on CERTAIN Hercules cards. Some cards will 
  452.                   display only one page (Athena Video BIOS displays all 
  453.                   pages on all Hercules Adapters and clones).
  454.  
  455.  
  456.  
  457.                                         7
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.         TECHNICALITIES
  468.  
  469.         HGCIBM installs itself between two BIOS (Basic Input/Output 
  470.         System) interrupts. The two interrupts used in this way are hex 
  471.         10 (BIOS video) and hex 8 (timer). The later is used only while 
  472.         in emulation mode. HGCIBM will fail to function properly if it is 
  473.         not given control during the above interrupts. Other software 
  474.         using interrupt 8 will be called on a priority basis, preempting 
  475.         HGCIBM if necessary. HGCIBM version 2.02 no longer passes 
  476.         interrupt 10h (while in emulation mode) since it was learned that 
  477.         compatible ROM BIOS was not always entirely compatible. If you 
  478.         have other software using interrupt 10h, try loading it after 
  479.         HGCIBM. You can still control HGCIBM after the interrupt is 
  480.         changed but you will not be allowed to un-install it. HGCIBM need 
  481.         be loaded only once each time the computer is started since it 
  482.         attaches itself to BIOS and stays in memory until re-boot or it 
  483.         is commanded to detach. The memory usage has increased to about 
  484.         5k now due to bypassing of ROM video BIOS in emulation mode, but 
  485.         does provide much improved color text emulation and should be 
  486.         compatible with a wider variety of machines.
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.                                         8
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.                          Athena Video BIOS Version 3.00
  534.                      Copyright (C) Athena Digital 1986,1987
  535.  
  536.          Preliminary Specifications - Subject to change without notice.
  537.  
  538.                                      PURPOSE
  539.  
  540.         For some unknown reason, hardware and software vendors have not 
  541.         seen fit to establish adequate specifications and graphics 
  542.         support for the widely used Hercules Graphics standard. The most 
  543.         peculiar aspect of this is the fact that the Hercules standard 
  544.         was the third available for the IBM personal computer and the 
  545.         first which offered truly high graphics resolution as well as the 
  546.         first to support graphics on the ttl monochrome display. Today, 
  547.         this standard is almost universally accepted as the display 
  548.         adapter of choice for ttl monochrome PC systems and its display 
  549.         quality is yet challenged only by the EGA standard which 
  550.         unfortunately requires an expensive color monitor to exploit it's 
  551.         capabilities.
  552.  
  553.         Athena Digital will attempt to remedy the problem by making it as 
  554.         simple as possible for vendors to exploit the capabilities of the 
  555.         Hercules card, CGA, EGA and others. Athena BIOS now fully 
  556.         supports the Hercules monochrome card and/or Color Graphics Card, 
  557.         the EGA (and eventually others) with fast support for standard 
  558.         modes, CGA emulation, and several new modes.
  559.  
  560.         One of the primary enhancements provided by ATHENA BIOS is 
  561.         Emulation of the Color Graphics Adapter on the Hercules Graphics 
  562.         Card. This allows Hercules owners to run the majority of graphics 
  563.         programs which do not already support the Hercules adapter. The 
  564.         list includes programs like BASICA, QuickBASIC, CodeView and the 
  565.         majority of all others.
  566.  
  567.         This eliminates the need for a Color monitor and graphics card in 
  568.         many cases with obvious price advantages.
  569.  
  570.         Athena also provides BIOS support for the higher resolution 
  571.         Hercules 350 vertical by 720 horizontal modes, and a new 350 
  572.         vertical by 360 mode with three intensities and 4 logical pixel 
  573.         colors. ALL of the Standard BIOS call support for these new modes 
  574.         including character generation, scrolling, and adapter switching 
  575.         which greatly simplifies direct support of Hercules high 
  576.         resolution modes by software vendors.
  577.  
  578.         ATHENA FEATURES
  579.  
  580.         o    Available in Programmer's Libraries for linking with high or 
  581.              low level languages.
  582.  
  583.         o    Supports 6 new Hercules only modes, which are as      
  584.              readily available to applications developers as are the      
  585.              standard modes.
  586.  
  587.  
  588.  
  589.                                         9
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.         o    Provides extended equipment, system capability information 
  600.              for applications.
  601.  
  602.         o    Supports Color Graphics Adapter Programs on the Hercules 
  603.              Graphics Card.
  604.  
  605.         o    Fully compatible with Microsoft Mouse or Microsoft Mouse 
  606.              software look-alikes.
  607.          
  608.         o    Includes a "Buss Terminator" which eliminates ALMOST all 
  609.              of the application software incompatibility with Emulation 
  610.              modes. This allows Microsoft's CodeView and QuickBasic 
  611.              editors to function normally in Emulation mode.
  612.  
  613.         o    BIOS Character generation and scrolling in Emulation Modes 
  614.              is accomplished without ghosting and no appreciable loss in 
  615.              speed (it is usually faster than the CGA through ROM BIOS).
  616.  
  617.         o    All 4 pages of 80 column CGA text (or 8 pages of 40 column 
  618.              text) are available on ALL Hercules cards or compatibles.
  619.  
  620.         o    Fully supports Hercules - Enhanced Graphics (color monitor) 
  621.              combinations.
  622.  
  623.         o    Fully Compatible with the new Hercules Plus card in 4K 
  624.              RamFont or Rom text mode.
  625.  
  626.         o    Supports new "Context Switching" between adapters and 
  627.              certain modes.
  628.  
  629.         o    Supports faster video operation in ALL modes than Standard 
  630.              ROM BIOS.
  631.  
  632.         o    Simple replacement for "buggy compatible" BIOS.
  633.  
  634.         o    Installs as a device driver for MS-DOS version 2.00 or later
  635.  
  636.         o    Adds PC-AT BIOS print string functions to the PC
  637.  
  638.         Once installed, Athena BIOS replaces the standard ROM video BIOS. 
  639.         Software installation is a matter of copying ATHENA.SYS to your 
  640.         boot disk, and inserting a one line command in your MS-DOS 
  641.         config.sys file. This MUST be the FIRST "DEVICE =" command in the 
  642.         file following the MOUSE and has the following basic form:
  643.  
  644.                                DEVICE = MOUSE.SYS
  645.                                DEVICE = ATHENA.SYS
  646.  
  647.              Athena BIOS is compatible with a variety of MS-DOS 
  648.         computers, including the PC, PC-XT, PC-AT, and Leading Edge, and 
  649.         most any other hardware compatible. Our aim is to work with as 
  650.         many different computers and display adapters as possible.
  651.  
  652.  
  653.  
  654.  
  655.                                        10
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.         Version 3.00 Video Bios does not replace EGA BIOS, but is 
  666.         compatible with it and controls it. If a non-ega adapter is 
  667.         active, Athena BIOS controls the active adapter. While the EGA is 
  668.         the active display, EGA BIOS controls the EGA adapter. Athena 
  669.         BIOS supports the Hercules Graphics Card in FULL modes WITH the 
  670.         EGA (if it is connected to a color display). The BIOS will 
  671.         continue to add features supporting as many of the popular 
  672.         adapters as possible and enhancing them wherever practical in 
  673.         order to maintain compatibility for your programs.
  674.  
  675.         CONTROLLING ATHENA BIOS AFTER INSTALLATION
  676.  
  677.         With ATHENA.SYS, you are provided a utility which allows you 
  678.         keyboard control over Athena's variety of modes. This utility 
  679.         operates as any other external DOS command. Simply place it in 
  680.         your program directory and use it with switches. If you forget 
  681.         the switches, typing ATHENA will give you a help screen.
  682.  
  683.         ATHENA /M[ono]      - Places BIOS in MONO or EGA MONO mode 
  684.                               (emulation disabled)
  685.         ATHENA /C[ga]       - Places BIOS in CGA or EGA Color mode 
  686.                               (emulation disabled)
  687.         ATHENA /E[mulate]   - Places BIOS in CGA EMULATION mode.
  688.         ATHENA /S[tatus]    - Gives a report of Athena's status.
  689.         ATHENA /Q[uiet]     - ADDING this switch to others to suppress 
  690.                               messages.
  691.         ATHENA /D[isable]   - Disables the BIOS and returns control to
  692.                               ROM
  693.         ATHENA /R[eset]     - Resets and enables the BIOS.
  694.  
  695.            These commands may be issued from a batch file if desired.
  696.  
  697.         SALES AND DISTRIBUTION POLICIES - ATHENA.SYS
  698.  
  699.         For the purchase price of $34.95, you will receive the program on 
  700.         a 5.25" IBM format diskette with documentation and Buss 
  701.         Terminator, and be notified of upgrades at low cost as they 
  702.         become available.
  703.  
  704.         Dealers, OEMS, and those desiring Site Licenses are welcome and 
  705.         encouraged to contact Athena Digital about liberal discounts.
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                                        11
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.         SOFTWARE AUTHORS
  732.  
  733.         Using Athena Video BIOS Libraries, you can easily upgrade your 
  734.         application to support Hercules Adapters. There are several 
  735.         options available to you with the library:
  736.  
  737.              o    You can link Athena Digital Video BIOS with your 
  738.                   application. This allows your program to use all Athena 
  739.                   functions whether the Athena device driver is present 
  740.                   or not.
  741.  
  742.              o    You can link with the interface module only. This 
  743.                   allows you to detect and and use Athena BIOS if the 
  744.                   Device Driver is present.
  745.  
  746.              o    You can link a PARTIAL BIOS with your application. This 
  747.                   allows you to use the CGA Emulation modes whether the 
  748.                   Device Driver is present or not, but defeats the usage 
  749.                   of Hercules Extended modes.
  750.  
  751.         See the QBDEMO program included for mmany more details.
  752.  
  753.         SUPPORTED HARDWARE
  754.  
  755.         o    IBM PC /XT /AT and most hardware compatibles which have an 
  756.              expansion buss. (Expansion buss not necessary for 
  757.              Libraries or for systems which will not need CGA Emulation).
  758.  
  759.         o    Microsoft Mouse (device drivers) or software compatibles 
  760.              which provide Microsoft's defined function calls.
  761.  
  762.         o    The following Video hardware combinations have been tested 
  763.              to date:
  764.  
  765.              Hercules Graphics Adapter, all versions including Plus. (MGA)
  766.              IBM Monochrome Text Adapter. (MTA)
  767.              IBM Color Graphics Adapter .. Hercules Color Card. (CGA)
  768.              IBM Enhanced Graphics Adapter (EGA)
  769.              Monochrome EGA with CGA
  770.              Color EGA or CGA with MTA or MGA.
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.                                        12
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.         Athena Digital Video BIOS FUNCTION CALLS
  798.  
  799.              This information is provided for technical users, and 
  800.         presumes familiarity with Standard BIOS function calls. Presented 
  801.         here is a subset of available services. A complete listing is 
  802.         available in the Athena Video BIOS Programmers Reference Manual, 
  803.         provided with each Programmer's Library.
  804.  
  805.         THIS DOCUMENT CONTAINS PRELIMINARY INFORMATION ABOUT ATHENA VIDEO 
  806.         BIOS CONTEXT CALLS. THE PURPOSE OF THIS IS TO SHOW THE INTENT OF 
  807.         THE CALLS. FOR PERMANENT AND ACCURATE INFORMATION, RELY ON THE 
  808.         PROGRAMMER'S REFERENCE DATA PROVIDED WITH LIBRARY PACKAGES.
  809.         ; ****
  810.         (AH)=B0h     SetContext - (AL) contains context value
  811.  
  812.         These functions first save the current BIOS variables in the 
  813.         current Context Buffer, then change the current VideoState 
  814.         "emulation active" flag according to the table below and take one 
  815.         of three actions depending on the condition of the target 
  816.         screen's Context save buffer. There are 3 save buffers in the 
  817.         initial Athena BIOS release:
  818.  
  819.              o    Hercules / Monochrome / Mono EGA adapter page at 0B000h
  820.              o    Hercules adapter page at 0B800h
  821.              o    Color Graphics Adapter / Color EGA Adapter at page 0B800h
  822.  
  823.         Each save buffer has room for:
  824.  
  825.              o    The current crt_context
  826.              o    The current crt_mode
  827.              o    The current crt_columns
  828.              o    The current crt_len
  829.              o    The current crt_start
  830.              o    The current cursor_posn[8]
  831.              o    The current cursor_mode
  832.              o    The current active_page
  833.              o    The current addr_6845
  834.              o    The current crt_mode_set
  835.              o    The current crt_palette
  836.              o    The current rows
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.                                        13
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.         Call B0h (cont'd)
  864.  
  865.         The three possible actions through call B0h are:
  866.  
  867.              o    If register AL bit 7 = 1 (or'd with 80h), the target 
  868.                   screen Context buffer is initialized and the screen
  869.                   is cleared.
  870.  
  871.                   Otherwise, the screen is not cleared and the Context 
  872.                   buffer is treated as follows:
  873.  
  874.              o    If the target context's save buffer has not been 
  875.                   overwritten since it was saved, it is restored intact.
  876.  
  877.              o    If the target context's save buffer has been 
  878.                   overwritten, it is initialized to default values of the 
  879.                   Target Context before restoration.
  880.  
  881.         Context switches do not "blink" the screen unless it is necessary 
  882.         to re-program the 6845 controller to make the switch.
  883.  
  884.         This is a powerful function. It enables programmers to switch 
  885.         rapidly back and forth between graphics and text, or between 
  886.         adapters without having to concern themselves about re-
  887.         initializing or restoring the screen(s). It also permits rapid 
  888.         switching between 40 or 80 column graphics text modes without 
  889.         loss of screen data, allowing mixed use of the provided (or user 
  890.         provided) character fonts in Hercules Graphics modes. When 
  891.         switching between 40 and 80 column text, the Context buffer is 
  892.         initialized, so it is necessary to locate the cursor wherever you 
  893.         want it in the new text map.
  894.  
  895.         Context switches also affect the way Athena interprets calls to 
  896.         the standard BIOS function 0 as shown below. These calls cannot 
  897.         be used to overide the hardware setup determined by Athens during 
  898.         initialization. Calls for invalid context switches are ignored 
  899.         and the call returns with the carry flag set:
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.                                        14
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.         Athena BIOS function call B0h (continued):
  930.                 CONTEXT VALUES AND EFFECTS ON CGA EMULATION FLAG
  931.         ;
  932.         TARGET MODE         EMULATION           TARGET SCREEN
  933.  
  934.                             Standard Modes (Contexts)
  935.  
  936.         (AL)=0              deactivated         CGA/EGA 40x25   alpha
  937.         (AL)=1              deactivated         CGA/EGA 40x25   alpha  
  938.         (AL)=2              deactivated         CGA/EGA 80x25   alpha
  939.         (AL)=3              deactivated         CGA/EGA 80x25   alpha
  940.         (AL)=4              deactivated         CGA/EGA 200x320 graph
  941.         (AL)=5              deactivated         CGA/EGA 200x320 graph
  942.         (AL)=6              deactivated         CGA/EGA 200x640 graph
  943.         (AL)=7              deactivated         MONO/EGA 80x25  alpha
  944.         (AL)=13             deactivated         EGA     320x200 graph
  945.         (AL)=14             deactivated         EGA     640x200 graph
  946.         (AL)=15             deactivated         EGA     640x350 graph
  947.         (AL)=16             deactivated         EGA     640x350 graph
  948.  
  949.  
  950.         Call B0h (cont'd)
  951.                                Hercules only modes
  952.  
  953.         CGA Emulation Contexts: (correspond to Standard modes 0 - 6)
  954.         (AL)=20
  955.            .                activated           HERC page at B800*
  956.            .
  957.         (AL)=26
  958.  
  959.         Hercules Logical Text Context 27:
  960.         (supports 8 pages of 80 column text on ALL Hercules Cards)
  961.         (AL)=27             deactivated         HERC 80x25 alpha
  962.  
  963.         Hercules Graphics Contexts 28,29,30,31:
  964.         (AL)=28             deactivated         HERC 350x720 at B000
  965.         (AL)=29             deactivated         HERC 350x720 at B800
  966.         (AL)=30             deactivated         HERC 350x360 at B000*
  967.         (AL)=31             deactivated         HERC 350x360 at B800*
  968.  
  969.         *modes 24,25, 30 and 31 support low and high intensity
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.                                        15
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.         Certain Context changes are not possible without erasure of the 
  996.         contents of a previously buffered Context. To gain an 
  997.         understanding of which context switches can be performed without 
  998.         erasing another, study the above table. Context switches between 
  999.         adapters never cause erasure. Context switches between differing 
  1000.         Hercules pages are likewise retained, except for emulation text 
  1001.         Contexts 20,21,22,23, and Logical text Contexts 27. 
  1002.  
  1003.         Emulation and Logical text modes use BOTH Hercules pages, thereby 
  1004.         erasing any previously saved Hercules Context .
  1005.  
  1006.         ; ****
  1007.         (AH)=D0h      SetAdapter - (AL) contains new Context Value as 
  1008.                       above. The new Context is set. This call supercedes 
  1009.                       the original BIOS call 0, which re-maps Modes 
  1010.                       to Contexts in order to effect transparent 
  1011.                       Emulation.
  1012.  
  1013.                       This call will switch to, reset and clear the 
  1014.                       target adapter, unless bit 7 is set, which inhibits 
  1015.                       clearing of the target regen buffer. The Target CRT 
  1016.                       Controller is re-initialized only if necessary.
  1017.  
  1018.         ; ****
  1019.         (AH)=0        SetMode - al contains then IBM defined Mode value.
  1020.                       This call will not switch adapters unless the 
  1021.                       equipment flag is changed prior to the call. The mode 
  1022.                       value is re-mapped to an Athena Context value 
  1023.                       depending on whether the BIOS is Emulating or not. 
  1024.                       This call is designed to support applications which 
  1025.                       are unaware of Athena BIOS. It's behavior is 
  1026.                       identical to the standard BIOS.
  1027.  
  1028.                       Function 0 is superceded in Athena BIOS by function 
  1029.                       D0, which accepts Context Values rather than Mode 
  1030.                       values.
  1031.  
  1032.                       Function 0 supports the IBM defined flag bit 7 
  1033.                       to inhibit regen buffer erasure.
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                                        16
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.         (AH)=BFh      AthenaState - Return the current driver state.
  1062.              OUTPUT:
  1063.                        (AL) = Current Context (as in call B0h)
  1064.                        (AH) = Character Columns on screen
  1065.                        (BH) = Current Active Display Page
  1066.                        (BL) = Reserved - destroyed
  1067.                        (DX) = Installed options, switch states
  1068.                            D0 = 1 if mono or Hercules card is installed
  1069.                            D1 = 1 if cga card is installed
  1070.                            D2 = 1 if an ega card is installed
  1071.                            D3 = 1 if Hercules modes/cga emulation are allowed
  1072.                            D4 = 1 if emulation modes are activated
  1073.                            D5 = reserved.
  1074.                            D6 = 1 if it is necessary to wait for 
  1075.                                   horizontal retrace before CGA text 
  1076.                                   screen updates. This bit is reset by 
  1077.                                   default when ATHENA initializes. If the 
  1078.                                   /W(ait) option switch is used on the 
  1079.                                   installation command line, this bit 
  1080.                                   will be set to cause ATHENA to wait for 
  1081.                                   retrace when updating CGA text. This 
  1082.                                   switch has no effect on Hercules or 
  1083.                                   Mono modes.
  1084.                                       Application software should never 
  1085.                                   try to wait in Hercules modes since the 
  1086.                                   CGA registers may not even exist and 
  1087.                                   the Hercules standard does not require 
  1088.                                   it.
  1089.                             D7 - D15 = reserved.
  1090.  
  1091.                        (CX) = ATHENA/HGCIBM version number
  1092.                               (CH) has major version
  1093.                               (CL) has minor version
  1094.  
  1095.                        (BP) = Reserved - destroyed
  1096.  
  1097.                        (DI) = Reserved - destroyed
  1098.  
  1099.  
  1100.  
  1101.  
  1102.                        (continued)
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.                                        17
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.         Function BFh (continued)
  1128.  
  1129.                        (SI) = Extended Flags.
  1130.                            D0 = 1 if the EGA is connected to an Enhanced 
  1131.                                 Color Display.
  1132.                            D1 = 1 if the EGA is connected to a Monochrome 
  1133.                                 Display.
  1134.                            D2 = 1 if the system is in CGA Context 2 or 3,           
  1135.                                 AND the system is directed to wait for 
  1136.                                 CRT retrace to update the screen.
  1137.                            D3 = 1 if the EGA is currently the active 
  1138.                                 adapter.
  1139.                            D5 = 1 if the EGA is currently disabled.
  1140.                                 (the system is in a Context which 
  1141.                                 requires ega ram to be disabled). While 
  1142.                                 disabled, function 12h will be ignored.
  1143.                            D6,D5 = Ega installed memory.
  1144.                            D7 = 1 if the EGA switches indicate it is the
  1145.                                 Primary System Adapter.
  1146.                            D8 = 1 if there is a Microsoft Compatible 
  1147.                                 Mouse and it is currently emulating a 
  1148.                                 light pen.
  1149.                            D9 - D14 Reserved.
  1150.                            D15 = 1 if there is a Microsoft Compatible 
  1151.                                  Mouse and it reports -1 to function 0.
  1152.  
  1153.         * set cx to -1 before calling function BFh, if the major version is 
  1154.         greater than or equal to 3, the response is from an Athena Video 
  1155.         BIOS device driver. If the major version is greater than ar equal 
  1156.         to 23, the response is from an Athena Library BIOS. There will be 
  1157.         no Library response unless you linked with it. A response less 
  1158.         than 3 is from HGCIBM.COM, which will not occur if you are linked 
  1159.         with a library. If cx returns -1, there is no Athena BIOS.
  1160.  
  1161.         HGCIBM.COM will not be upgraded past major version 2, and 
  1162.         behavior in general is somewhat different than from the BIOS. If 
  1163.         HGCIBM is detected, either ignore it or use only the emulation or
  1164.         CGA modes. All future enhancements will be limited to Athena 
  1165.         Drivers or Libraries. 
  1166.  
  1167.         The above information is only a smattering of available services 
  1168.         and enhancements. Complete technical documentation is provided 
  1169.         with Programmer's Libraries and we don't recommend you try to 
  1170.         communicate with the BIOS without obtaining the technical 
  1171.         information.
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.                                        18
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.         ATHENA LIBRARY VERSIONS
  1194.  
  1195.         These are introduced in the accompanying QBDEMOC program. The 
  1196.         DEMO is subject to continuous updates and revisions as the 
  1197.         BIOS continues. It is entirely possible that new features and 
  1198.         capabilities have been added since this file was released. The 
  1199.         DEMO is a short first-hand introduction to Athena Device Drivers 
  1200.         and Athena Language Libraries for Programmers. If you find you 
  1201.         are seriously interested in Athena Digital Video BIOS, we will 
  1202.         send you the latest demo materials on request. There are 2 files 
  1203.         required to run the demo:
  1204.  
  1205.              QBDEMOC.EXE    ; QuickBasic library DEMO - BCOM20 program module
  1206.              FEATURES.PRX   ; DEMO text
  1207.  
  1208.         o    To run the demo, place these two files in your default 
  1209.              directory and type "QBDEMOC".
  1210.  
  1211.         o    If you have an older style Color Graphics Adapter which 
  1212.              "snows" when text is printed, then start the demo as 
  1213.              "QBDEMOC/W".
  1214.  
  1215.         o    It makes no difference whether HGCIBM is installed or not to 
  1216.              run the demo, since Athena Video BIOS is linked with the 
  1217.              demo and will be used in either case.
  1218.  
  1219.         o    DEMO Version 1.01 will now run on the EGA. If the EGA      
  1220.              is connected to a Monochrome Display, the Athena Logo will      
  1221.              display incorrectly. This appears to be a QuickBasic 2.00      
  1222.              bug but we have not yet heard from Microsoft about it so it 
  1223.              may just be our QuickBASIC programming. It definitely has 
  1224.              NOTHING to do with the BIOS.
  1225.  
  1226.         In case the demo is missing, here are a scant few of the 
  1227.         highlights of Athena Video BIOS Libraries.
  1228.  
  1229.         o    Allows graphic (or text) programs written using standard 
  1230.              video BIOS for all except regen access to run unmodified on 
  1231.              a Hercules Graphics Card. It is only necessary to initialize 
  1232.              the BIOS on entry, and detach it on exit. An example of one 
  1233.              such program would be anything compiled under Microsoft's 
  1234.              QuickBasic and using QuickBasic's screen and graphics 
  1235.              functions such as QBDEMOC.EXE.
  1236.  
  1237.         o    Provides all of the functions that are described under 
  1238.              Athena Video BIOS above. Thus it offers immediate Hercules 
  1239.              support for existing applications, and a natural upward path 
  1240.              to extended Hercules support.
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.                                        19
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.         o    Cooperates with (or without) a resident Athena Device 
  1260.              Driver. If your Library is a later version, it automatically 
  1261.              coordinates a temporary "takeover" from the resident while 
  1262.              your program runs. Control returns to the resident when your 
  1263.              program exits. This assures that your program will always 
  1264.              use the latest BIOS available, whether its the one you 
  1265.              linked with or not.
  1266.  
  1267.         o    Libraries will probably be released for QuickBASIC, C, and 
  1268.              Macro Assembler by the time anyone could read this. Others 
  1269.              will be developed depending on customer interest. Write or 
  1270.              call us about your favorite programming language if you 
  1271.              would like to see an Athena library to link with it. The 
  1272.              library core is intrinsically compatible with any compiler 
  1273.              supporting external assembly language procedure calls and a 
  1274.              means of linking them with the compiled program code.
  1275.  
  1276.              More details are available on request. 
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.                                        20
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.